package main

import (
	profilepb "coolcar/proto/profile_out/v1"
	rentalpb "coolcar/proto/rental_out/v1"
	"coolcar/srvs/rental_srv/handler/profile"
	"coolcar/srvs/rental_srv/handler/trip"
	"log"
	"net"

	"google.golang.org/grpc"
)

func main() {
	listener, err := net.Listen("tcp", ":50922")
	if err != nil {
		log.Fatalf("failed to listen: %v \n", err)
	}

	s := grpc.NewServer()
	rentalpb.RegisterTripServiceServer(s, &trip.Service{})
	profilepb.RegisterProfileServiceServer(s, &profile.Service{})

	log.Fatal(s.Serve(listener))
}
